var home_index = {
	data: {},
	dataInit: function() {
		home_index.fn.initialize();
		home_index.fn.list_init();
	},
	eventBind: function() {},
	fn: {
		list_init: function() {
			var token = localStorage.getItem('token');
			var uid = localStorage.getItem('uid');	
			var baby_id=JSON.parse(localStorage.getItem('babyOne')).id;
			$.ajax({
				type: 'GET',
				url: config.host + "home/index/getIndex",
				data: {
					uid: uid,
					token: token,
					keytype:1,//通知类型为1
					page: 0,
					video_id:video_id,
				},
				dataType: "jsonp",
				success: function(list) {
					if (list.status == 1) {
						console.log("请求成功");
						home_index.fn.dataFill(list);
					} else {
						$.alert(list.data);
					}
				},
				error: function(xhr, type) {
					console.log("请求失败");
					$.alert('网络异常');
				}
			});
		},
		dataFill: function(list) {
			if (list) {
				var data = {
					total: list.data.length,
					list: list,
					host:localStorage.getItem('file'),
				};
				var html = template('list_content', data);
				document.getElementById('index_list').innerHTML = html;
			}
		},
		tagFill: function() {
			var data = {
				bar_Title: '通知公告',
				ChaBuDaoXinXi: '查不到信息',
			};
			var tem = template('page', data);
			document.getElementById('page').innerHTML = tem;
		},
		initialize: function() {
			home_index.fn.tagFill();
		},
		cordavaDataGet: function() {
			home_index.dataInit();
			home_index.eventBind();
		},
	}
}
Zepto(function($) {
	home_index.fn.cordavaDataGet();
});